# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-conf
pkgver=3.14.3
pkgrel=1
pkgdesc="Alpine configuration management scripts"
url="https://git.alpinelinux.org/alpine-conf/about"
arch="all"
license="MIT"
depends="openrc>=0.24.1-r6 busybox>=1.26.1-r3"
checkdepends="kyua"
source="https://gitlab.alpinelinux.org/alpine/alpine-conf/-/archive/$pkgver/alpine-conf-$pkgver.tar.gz
	0001-lbu-fix-sysconfdir-regression.patch
	"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	make VERSION=$pkgver-r$pkgrel
}

package() {
	cd "$builddir"
	make install PREFIX= DESTDIR="$pkgdir"
	for i in commit exclude include status update; do
		ln -s lbu "$pkgdir"/sbin/lbu_$i
	done
}

check() {
	make check
}

sha512sums="
52a9a9f6a7148191f8bf4e32a450ac8bf01a93679f5962e286f1cdb37c47c9f122d8e40eb72826ba8dd59fd87d2fe9ea2678b68dbf1e3097a7c3c2d2bedb6830  alpine-conf-3.14.3.tar.gz
ae53ef255b4c83260298d0ace2e035cf8a67ac2566dbb560eda3e951d40d13db48857a1acf8b1c2c3bf7dab031078b14b07c1605d8f9ce979406794486cffbf4  0001-lbu-fix-sysconfdir-regression.patch
"
